﻿package {
	public class test {}
}

/// slice tests

trace("/// slice");

trace("// trace(\"123456789\".slice(0, 9));");
trace("123456789".slice(0, 9));
trace("// trace(\"123456789\".slice(0, 0));");
trace("123456789".slice(0, 0));
trace("// trace(\"123456789\".slice(9, 0));");
trace("123456789".slice(9, 0));
trace("// trace(\"123456789\".slice(0, -1));");
trace("123456789".slice(0, -1));
trace("// trace(\"123456789\".slice(-6, -1));");
trace("123456789".slice(-6, -1));
trace("// var s = new String(\"\");");
var s = new String("");
trace("// trace( typeof s.slice(), s.slice());");
trace( typeof s.slice(), s.slice());
trace("// trace( s.slice(false, true));");
trace( s.slice(false, true));
trace("// trace( s.slice(25, 29));");
trace( s.slice(25, 29));
trace("// var s = new String(\"123456789\");");
var s = new String("123456789");
trace("// trace( 1, typeof s.slice(), s.slice());");
trace( 1, typeof s.slice(), s.slice());
trace("// trace( 2, s.slice(false, true));");
trace( 2, s.slice(false, true));
trace("// trace( 3, s.slice(4, -3));");
trace( 3, s.slice(4, -3));
trace("// trace( 4, s.slice(25, 29));");
trace( 4, s.slice(25, 29));
trace("// trace( 5, s.slice(-5, 9));");
trace( 5, s.slice(-5, 9));
trace("// trace( 6, s.slice(2, NaN));");
trace( 6, s.slice(2, NaN));
trace("// trace( 7, s.slice(NaN, 2));");
trace( 7, s.slice(NaN, 2));
trace("// trace( 8, s.slice(2, undefined));");
trace( 8, s.slice(2, undefined));
trace("// trace( 9, s.slice(undefined, 2));");
trace( 9, s.slice(undefined, 2));
trace("// trace( 10, s.slice(-0.01,0));");
trace( 10, s.slice(-0.01,0));
trace("// trace( 11, s.slice(s.length, s.length));");
trace( 11, s.slice(s.length, s.length));
trace("// trace( 12, s.slice(s.length+1, 0));");
trace( 12, s.slice(s.length+1, 0));
trace("// trace( 13, s.slice(Infinity, 5));");
trace( 13, s.slice(Infinity, 5));
trace("// trace( 14, s.slice(5, Infinity));");
trace( 14, s.slice(5, Infinity));
trace("// trace( 15, s.slice(Infinity, Infinity));");
trace( 15, s.slice(Infinity, Infinity));
trace("// trace( 16, s.slice(-Infinity, -Infinity));");
trace( 16, s.slice(-Infinity, -Infinity));
trace("// trace( 17, s.slice(-Infinity, Infinity));");
trace( 17, s.slice(-Infinity, Infinity));
trace("// trace( 18, s.slice(Infinity, -Infinity));");
trace( 18, s.slice(Infinity, -Infinity));
trace("// trace( 19, s.slice(NaN, Infinity));");
trace( 19, s.slice(NaN, Infinity));
trace("// trace( 20, s.slice(Infinity, NaN));");
trace( 20, s.slice(Infinity, NaN));
trace("// trace( 21, s.slice(NaN, -Infinity));");
trace( 21, s.slice(NaN, -Infinity));
trace("// trace( 22, s.slice(-Infinity, NaN));");
trace( 22, s.slice(-Infinity, NaN));

trace("/// substr tests");

trace("// var s = new String(\"\");");
var s = new String("");
trace("// trace( typeof s.substr(), s.substr());");
trace( typeof s.substr(), s.substr());
trace("// trace( s.substr(false, true));");
trace( s.substr(false, true));
trace("// trace( s.substr(25, 29));");
trace( s.substr(25, 29));
trace("// var s = new String(\"123456789\");");
var s = new String("123456789");
trace("// trace( 1, typeof s.substr(), s.substr());");
trace( 1, typeof s.substr(), s.substr());
trace("// trace( 2, s.substr(false, true));");
trace( 2, s.substr(false, true));
trace("// trace( 3, s.substr(4, -3));");
trace( 3, s.substr(4, -3));
trace("// trace( 4, s.substr(25, 29));");
trace( 4, s.substr(25, 29));
trace("// trace( 5, s.substr(-5, 9));");
trace( 5, s.substr(-5, 9));
trace("// trace( 6, s.substr(2, NaN));");
trace( 6, s.substr(2, NaN));
trace("// trace( 7, s.substr(NaN, 2));");
trace( 7, s.substr(NaN, 2));
trace("// trace( 8, s.substr(2, undefined));");
trace( 8, s.substr(2, undefined));
trace("// trace( 9, s.substr(undefined, 2));");
trace( 9, s.substr(undefined, 2));
trace("// trace( 10, s.substr(-0.01,0));");
trace( 10, s.substr(-0.01,0));
trace("// trace( 11, s.substr(s.length, s.length));");
trace( 11, s.substr(s.length, s.length));
trace("// trace( 12, s.substr(s.length+1, 0));");
trace( 12, s.substr(s.length+1, 0));
trace("// trace( 13, s.substr(Infinity, 5));");
trace( 13, s.substr(Infinity, 5));
trace("// trace( 14, s.substr(5, Infinity));");
trace( 14, s.substr(5, Infinity));
trace("// trace( 15, s.substr(Infinity, Infinity));");
trace( 15, s.substr(Infinity, Infinity));
trace("// trace( 16, s.substr(-Infinity, -Infinity));");
trace( 16, s.substr(-Infinity, -Infinity));
trace("// trace( 17, s.substr(-Infinity, Infinity));");
trace( 17, s.substr(-Infinity, Infinity));
trace("// trace( 18, s.substr(Infinity, -Infinity));");
trace( 18, s.substr(Infinity, -Infinity));
trace("// trace( 19, s.substr(NaN, Infinity));");
trace( 19, s.substr(NaN, Infinity));
trace("// trace( 20, s.substr(Infinity, NaN));");
trace( 20, s.substr(Infinity, NaN));
trace("// trace( 21, s.substr(NaN, -Infinity));");
trace( 21, s.substr(NaN, -Infinity));
trace("// trace( 22, s.substr(-Infinity, NaN));");
trace( 22, s.substr(-Infinity, NaN));

trace("/// substring tests");

trace("// var s = new String(\"\");");
var s = new String("");
trace("// trace( typeof s.substring(), s.substring());");
trace( typeof s.substring(), s.substring());
trace("// trace( s.substring(false, true));");
trace( s.substring(false, true));
trace("// trace( s.substring(25, 29));");
trace( s.substring(25, 29));
trace("// var s = new String(\"123456789\");");
var s = new String("123456789");
trace("// trace( 1, typeof s.substring(), s.substring());");
trace( 1, typeof s.substring(), s.substring());
trace("// trace( 2, s.substring(false, true));");
trace( 2, s.substring(false, true));
trace("// trace( 3, s.substring(4, -3));");
trace( 3, s.substring(4, -3));
trace("// trace( 4, s.substring(25, 29));");
trace( 4, s.substring(25, 29));
trace("// trace( 5, s.substring(-5, 9));");
trace( 5, s.substring(-5, 9));
trace("// trace( 6, s.substring(2, NaN));");
trace( 6, s.substring(2, NaN));
trace("// trace( 7, s.substring(NaN, 2));");
trace( 7, s.substring(NaN, 2));
trace("// trace( 8, s.substring(2, undefined));");
trace( 8, s.substring(2, undefined));
trace("// trace( 9, s.substring(undefined, 2));");
trace( 9, s.substring(undefined, 2));
trace("// trace( 10, s.substring(-0.01,0));");
trace( 10, s.substring(-0.01,0));
trace("// trace( 11, s.substring(s.length, s.length));");
trace( 11, s.substring(s.length, s.length));
trace("// trace( 12, s.substring(s.length+1, 0));");
trace( 12, s.substring(s.length+1, 0));
trace("// trace( 13, s.substring(Infinity, 5));");
trace( 13, s.substring(Infinity, 5));
trace("// trace( 14, s.substring(5, Infinity));");
trace( 14, s.substring(5, Infinity));
trace("// trace( 15, s.substring(Infinity, Infinity));");
trace( 15, s.substring(Infinity, Infinity));
trace("// trace( 16, s.substring(-Infinity, -Infinity));");
trace( 16, s.substring(-Infinity, -Infinity));
trace("// trace( 17, s.substring(-Infinity, Infinity));");
trace( 17, s.substring(-Infinity, Infinity));
trace("// trace( 18, s.substring(Infinity, -Infinity));");
trace( 18, s.substring(Infinity, -Infinity));
trace("// trace( 19, s.substring(NaN, Infinity));");
trace( 19, s.substring(NaN, Infinity));
trace("// trace( 20, s.substring(Infinity, NaN));");
trace( 20, s.substring(Infinity, NaN));
trace("// trace( 21, s.substring(NaN, -Infinity));");
trace( 21, s.substring(NaN, -Infinity));
trace("// trace( 22, s.substring(-Infinity, NaN));");
trace( 22, s.substring(-Infinity, NaN));

